<?php

namespace app\api\validate;

use app\common\basic\BaseValidate;

class FollowUpValidate extends BaseValidate
{
    protected $rule = [
        'customer_id' => 'require|integer|gt:0',
        'type' => 'require',
        'content' => 'require|max:500',
        'result' => 'require|max:255',
        'address' => 'max:500',
    ];

    protected $message = [
        'customer_id.require' => '客户ID不能为空',
        'customer_id.integer' => '客户ID必须是整数',
        'customer_id.gt' => '客户ID必须大于0',
        'type.require' => '跟进方式不能为空',
        'content.require' => '跟进纪要不能为空',
        'content.max' => '跟进纪要不能超过500字',
        'result.require' => '跟进结果不能为空',
        'result.max' => '跟进结果不能超过255字',
    ];

    protected $scene = [
        'create' => ['customer_id', 'type', 'content', 'result'],
    ];
}